﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Coding4Fun.SlideShow
{
    public partial class Loading : UserControl
    {
        public Loading()
        {
            InitializeComponent();
        }

        public new Visibility Visibility
        {
            get { return base.Visibility; }
            set
            {
                if (value == Visibility.Visible)
                {
                    fadeIn.Begin();
                    perfBar.Visibility = value;
                }
                else
                    fadeOut.Begin();
            }
        }

        private void fadeOut_Completed(object sender, EventArgs e)
        {
            perfBar.Visibility = Visibility.Collapsed;
        }
    }
}
